import {intercept} from './intercept.js'
import store from '@/store'
export function response(res,options){
	const {data,status}=res
	options.jwt=false
	if(status==200){
		if(data.code=='0000'){
			return data.data
		}else{

			if(data.code=='5103'){
				store.dispatch("token","");
				return	intercept(options)
				
			}
			if(data.code=='5104'){
				store.dispatch("token", "");
				options.jwt=true
				return intercept(options)
			}
			return data
		}
	}
}